ia64, xend: Close nvram file when rebooting HVM domain
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 12 Dec 2007 10:08:54 +0000 (10:08 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 12 Dec 2007 10:08:54 +0000 (10:08 +0000)
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xend/XendDomainInfo.py

index 4558a9cec63145cc2f305e56a64f2ed0e349ae78..f09fd7d94f68a6b9299fdc3706fd305ba971400a 100644 (file)
@@ -1880,8 +1880,6 @@ class XendDomainInfo:
 
         self._cleanupVm()
         if self.dompath is not None:
-            if self.domid is not None:
-                xc.domain_destroy_hook(self.domid)
             self.destroyDomain()
 
         self._cleanup_phantom_devs(paths)
@@ -1899,6 +1897,7 @@ class XendDomainInfo:
 
         try:
             if self.domid is not None:
+                xc.domain_destroy_hook(self.domid)
                 xc.domain_destroy(self.domid)
                 for state in DOM_STATES_OLD:
                     self.info[state] = 0